import { ref, h } from '../../lib/min-vue.esm.js'
const array1 = [h('div', {}, 'A'), h('div', {}, 'B')]
// const array2 = [h('div', {}, 'C'), h('div', {}, 'D')]

const text = 'text'
// 老的是数组，新的是文本
export default {
  name: 'App',
  setup() {
    const flag = ref(true)
    window.flag = flag
    const onClick = () => {
      flag.value = !flag.value
      console.log(flag.value)
    }

    return {
      flag,
      onClick
    }
  },
  render() {
    // const self = this

    return this.flag === true ? h('div', {}, text) : h('div', {}, array1)
  }
}
